The process of rendering two-dimensional images from three-dimensional scenes is commonly referred to as image processing. As the modern computer industry evolves image processing evolves as well. One particular goal in the evolution of image processing is to make two-dimensional simulations or renditions of three-dimensional scenes as realistic as possible. One limitation of rendering realistic images is that modern monitors display images through the use of pixels.
A pixel is the smallest area of space which can be illuminated on a monitor. Most modern computer monitors will use a combination of hundreds of thousands or millions of pixels to compose the entire display or rendered scene. The individual pixels are arranged in a grid pattern and collectively cover the entire viewing area of the monitor. Each individual pixel may be illuminated to render a final picture for viewing.
One technique for rendering a real world three-dimensional scene onto a two-dimensional monitor using pixels is called rasterization. Rasterization is the process of taking a two-dimensional image represented in vector format (mathematical representations of geometric objects within a scene) and converting the image into individual pixels for display on the monitor. Rasterization is effective at rendering graphics quickly and using relatively low amounts of computational power; however, rasterization suffers from several drawbacks. For example, rasterization often suffers from a lack of realism because it is not based on the physical properties of light, rather rasterization is based on the shape of three-dimensional geometric objects in a scene projected onto a two dimensional plane. Furthermore, the computational power required to render a scene with rasterization scales directly with an increase in the complexity of the scene to be rendered. As image processing becomes more realistic, rendered scenes also become more complex. Therefore, rasterization suffers as image processing evolves, because rasterization scales directly with complexity.
With continued improvements in semiconductor technology in terms of clock speed and increased use of parallelism; however, rasterization becomes viable for more complex images. At the chip level, multiple processor cores are often disposed on the same chip, functioning in much the same manner as separate processor chips, or to some extent, as completely separate computers. In addition, even within cores, parallelism is employed through the use of multiple execution units that are specialized to handle certain types of operations. Hardware-based pipelining is also employed in many instances so that certain operations that may take multiple clock cycles to perform are broken up into stages, enabling other operations to be started prior to completion of earlier operations. Multithreading is also employed to enable multiple instruction streams to be processed in parallel, enabling more overall work to performed in any given clock cycle.
As an example, some conventional rasterization engines used in graphics processing units attempt to increase throughput by partitioning an image space into different regions and assigning those regions to different threads running on different processing elements or units so that the different regions of the image space may be rendered in parallel. It has been found, however, that the assignment of threads to regions of an image space can have a significant amount of impact on overall throughput, and moreover, that selecting an optimum assignment that maximizes overall throughput is often difficult to calculate, particularly in dynamic and real time rendering environments where the content of a scene may vary significantly over time.
In particular, in gaming and other real-time environments, objects can move around a scene, resulting in the amount of work required to render a particular region of an image space changing from image frame to image frame. With a static allocation of regions to a pool of threads, the workloads of individual threads may vary considerably, with threads assigned to regions with numerous and/or complex objects generally having greater workloads than threads assigned to more sparse and less complex regions. As a result, some threads may not be able to complete their assigned work in a timely fashion, while other threads may be underutilized.
Therefore, a need exists in the art for a manner of efficiently allocating threads used in rasterization to regions of an image space in a dynamic image processing environment.